﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Simulation.Framework
{
    public class SingleBase<T> where T : class, new()
    {
        private static T _instance;
        public static T getInstance() {
            return _instance = _instance == null ? new T() : _instance;
        }

        public virtual void Init() { }

        public virtual void Clear() { }

        public void Destroy()
        {
            _instance = null;
        }
    }
}